-
Notifications
You must be signed in to change notification settings - Fork 4
Add annotation @Core.ContentDisposition to get fileName on creation #232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| {Value: note} | ||
| ] | ||
| } { | ||
| content @Core.ContentDisposition: { Filename: fileName, Type: 'inline' }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ist da nicht das gleiche wie in:
Line 10 in a581f32
| ContentDisposition.Filename: fileName, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, das hatte ich ganz uebersehen. Es hatte bisher aber nicht funktioniert, der fileName wurde nicht uebertragen. Mit dieser Annotation hat es dann geklappt. Die SDM Kollegen haben danach gefragt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dann kann man es vielleicht an der anderen Stelle löschen, aber wenn es so funktioniert, dann approve ich mal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wie ist das mit Annotations bei Aspekten, werden die auch vererbt ? Bisher war diese Annotation beim Aspect MediaData. Hatte das frueher schon mal funktioniert ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ich dachte sie werden vererbt, aber wenn das nicht richtig funktioniert, dann sollten wir alle an den Attachment-Aspect packen, was denkst du?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Scheint ein Bug oder Feature im cds compiler zu sein. Nur wenn ich die Anntation nochmal am Attachment Aspekt mache, bekomme ich die Annotations auch im EDMX zu sehen:
<Annotations Target="AdminService.Books_covers/content">
<Annotation Term="Core.ContentDisposition">
<Record Type="Core.ContentDispositionType">
<PropertyValue Property="Filename" Path="fileName"/>
<PropertyValue Property="Type" String="inline"/>
</Record>
</Annotation>
<Annotation Term="Core.MediaType" Path="mimeType"/>
<Annotation Term="Common.Label" String="{i18n>attachment_content}"/>
</Annotations>Das EDMX ist allerdings relevant fuer das Fiori UI.
Ich merge deswegen diesen PR und lasse die Annotation auch am MediaData Aspekt stehen.
Add annotation @Core.ContentDisposition to get fileName on creation of attachment.
With this annotation added, the Fiori UI sends a request containing the fileName to create the attachments:
See also: https://github.com/cap-js/attachments/blob/898eca7a89a84f15c59ce5a85bea117df19952d2/index.cds#L44